<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      console.log(Object.prototype.toString.call('hello')); //[object String]
      console.log(Object.prototype.toString.call(123)); //[object Number]
      console.log(Object.prototype.toString.call(null)); //[object Null]
      console.log(Object.prototype.toString.call(undefined)); //[object Undefined]
      console.log(Object.prototype.toString.call([])); //[object Array]
      console.log(Object.prototype.toString.call({})); //[object Object]

      class User {}
      const u = new User();
      console.log(Object.prototype.toString.call(u)); //[object Object]
    </script>
  </body>
</html>
